package com.gs.controller;

import com.gs.service.MessageService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@RestController
public class MessageController {
    @Resource
    private MessageService messageService;

    @RequestMapping("/send/msg")
    public String send(String phone,String message){
        Map<String,String> map=new HashMap<>();
        map.put("phone",phone);
        map.put("code",message);
        messageService.send(map);
        return "ok";

    }


}
